package com.panel.rect;

import java.util.Random;

/**
 * @author dell
 */
public class CreateRect {
    //初始化方块的方法
    public static int[] init(){
        Random random = new Random();
        int [] a = new int[2];
        //创建方块右边
        a[0] = random.nextInt(200)+100;
        //创建方块左边
        a[1] = random.nextInt(200)+100;
         if(a[0]>a[1]){
             int temp  = a[0];
             a[0] = a[1];
             a[1] = temp;
         }
         return  a;
    }
}
